package redundancies;

	import java.util.Stack;
	
public class EmploymentSimulator {

	private Stack<Person> employees;
	
	public EmploymentSimulator() {
		employees = new Stack<Person>();
	}
	
	public void employ(Person p) {
		employees.add(p);
	}
	
	public void makeRedundant() {
		if (!employees.isEmpty()) {
			employees.pop();
		}
	}
	
	public void printNextForTheChop() {
		employees.peek().print();
		System.out.println(" and I am next to be sacked.");
	}
	
	public int companySize() {
		return employees.size();
	}
	
	public void printEmployees() {
		System.out.println("The company employs: ");
		for (Person p : employees) {
			p.print();
			System.out.println();
		}
	}
}
